package com.x.service.entity.map;

import com.x.service.entity.CatsList;
import com.x.zssqservice.bean.BookDetail;

/**
 * Created by H on 18/5/9.
 */

public class BookDetialMap implements IMap<BookDetail, com.x.service.entity.BookDetail> {
    @Override
    public com.x.service.entity.BookDetail map(BookDetail bookDetail) {
        com.x.service.entity.BookDetail book = new com.x.service.entity.BookDetail();
        book._id = bookDetail._id;
        book.author = bookDetail.author;
        book.cover = IMG_BASE_URL + bookDetail.cover;
        book.isSerial = bookDetail.isSerial;
        book.lastChapter = bookDetail.lastChapter;
        book.longIntro = bookDetail.longIntro;
        book.serializeWordCount = bookDetail.serializeWordCount;
        book.title = bookDetail.title;
        book.updated = bookDetail.updated;
        book.chaptersCount = bookDetail.chaptersCount;
        book.wordCount = bookDetail.wordCount;
        book.cat = new CatsList.Cat();
        book.cat.name = bookDetail.cat;
        book.majorCate = bookDetail.majorCate;
        book.minorCate = bookDetail.minorCate;
        book.tags = bookDetail.tags;
        book.categories = bookDetail.categories;
        return book;
    }
}
